<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实现网页收藏</title>
    <script src="../../res/jquery-3.7.1.min.js"></script>
    <script>
        $(function () {
            $("#favorite").click(function () {
                if (window.ActiveXObject || "ActiveXObject" in window) {//用于判断浏览器是否为IE浏览器
                    alert("您的浏览器版本过低,请升级到IE8以上版本");
                } else {
                    alert("收藏成功!");
                }
            }

            )
        });
    </script>
</head>

<body>
    <!-- 收藏 -->
    <button type="button" id="favorite"> 收藏</button>
</body>

</html>